<aside class="main-sidebar">

	<section class="sidebar">

		<!-- Sidebar user panel -->
		<div class="user-panel">
			<div class="pull-left image">
				<img src="<?= $directoryAsset ?>/img/avatar5.png"
					class="img-circle" alt="User Image" />
			</div>
			<div class="pull-left info">
				<p><?= $username?>(<?= $role_name?>)</p>

				<a href="#"><i class="fa fa-circle text-success"></i><?= $is_logining?></a>
			</div>
		</div>

		<!-- search form -->
		<form action="#" method="get" class="sidebar-form">
			<div class="input-group">
				<input type="text" name="q" class="form-control" placeholder="搜索..." />
				<span class="input-group-btn">
					<button type='submit' name='search' id='search-btn'
						class="btn btn-flat">
						<i class="fa fa-search"></i>
					</button>
				</span>
			</div>
		</form>
		<!-- /.search form -->
		<?php
        $url = 'http://'.$_SERVER['HTTP_HOST'];
		$array = [
                        [
                            'label' => '首页报表',
                            'icon' => 'home',
                            'url' => [
                                '/site/index'
                            ],
                        ],
                        [
                            'label' => '分类模型管理',
                            'icon' => 'hand-spock-o',
                            'url' => [
                                '#'
                            ],
                            'items'=>[
                                [
                                    'label' => '分类模型',
                                    'icon' => 'hand-spock-o',
                                    'url' => [
                                        '/arc-classify/index'
                                    ],
                                ],
                                [
                                    'label' => '添加关键字',
                                    'icon' => 'hand-spock-o',
                                    'url' => [
                                        '/arc-keyword/index'
                                    ],
                                ]
                            ]
                        ],
                        [
                            'label' => '质检机器人',
                            'icon' => 'eyedropper',
                            'url' => [
                                '/arc-android/index'
                            ]
                        ],
                        [
                            'label' => 'CTI录音文件列表',
                            'icon' => 'file-audio-o',
                            'url' => [
                                '/thing-record-file/index'
                            ]
                        ],
                        [
                            'label' => 'CTI录音文件分类',
                            'icon' => 'folder-open',
                            'url' => [
                                '/thing-record-file/classifys'
                            ]
                        ],
                        [
                            'label' => 'CTI文件分类进度',
                            'icon' => 'hourglass-2',
                            'url' => [
                                '/arc-train/index'
                            ]
                        ],
                        [
                            'label' => 'CTI文件已分类',
                            'icon' => 'battery-3',
                            'url' => [
                                '/arc-progress/index'
                            ]
                        ],
//                        [
//                            'label' => '热词以及替换词',
//                            'icon' => 'battery-3',
//                            'url' => [
//                                '/arc-hot/index'
//                            ]
//                        ],
		];
		if ($role_name != "超级管理员") {
			foreach ( $array as $k => $arr ) {
				if ($arr ['label'] == '生成MVC（Gii）' || $arr ['label'] == '调试') {
					unset ( $array [$k] );
				}
			}
		}
		?>
            <?=dmstr\widgets\Menu::widget ( [ 'options' => [ 'class' => 'sidebar-menu tree','data-widget' => 'tree' ],'items' => $array ] )?>

    </section>

</aside>